import { ANNOTATION_INFO, type Annotation } from "@/utils/annotation";
import { squareToCoordinates } from "@/utils/chessops";
import { Box } from "@mantine/core";
import type { Color, Square } from "chessops";

export default function AnnotationHint({
  square,
  annotation,
  orientation,
}: {
  square: Square;
  annotation: Annotation;
  orientation: Color;
}) {
  const { file, rank } = squareToCoordinates(square, orientation);
  const color = ANNOTATION_INFO[annotation]?.color || "gray";

  return (
    <Box
      style={{
        position: "absolute",
        width: "12.5%",
        height: "12.5%",
        left: `${(file - 1) * 12.5}%`,
        bottom: `${(rank - 1) * 12.5}%`,
      }}
    >
      <Box pl="90%">
        {
          <Box
            style={{
              transform: "translateY(-40%) translateX(-50%)",
              zIndex: 100,
              filter: "url(#shadow)",
              overflow: "initial",
              borderRadius: "50%",
            }}
            w="45%"
            h="45%"
            pos="absolute"
            bg={color}
            variant="filled"
          >
            <svg viewBox="0 0 100 100">
              <title>{annotation}</title>
              <defs>
                <filter id="shadow">
                  <feDropShadow
                    dx="0"
                    dy="1"
                    floodOpacity="0.3"
                    stdDeviation="0"
                  />
                </filter>
              </defs>
              <g>{glyphToSvg[annotation]}</g>
            </svg>
          </Box>
        }
      </Box>
    </Box>
  );
}

// taken from lichess https://github.com/lichess-org/lila/blob/b7d9abb9f624b1525804aeb49a5b2678f23aae09/ui/analyse/src/glyphs.ts#L49C1-L85
// added manually drawn path for Miss (⊗)
const glyphToSvg: Record<Annotation, JSX.Element> = {
  "": <></>,
  "!": (
    <>
      <path
        fill="#fff"
        d="M54.967 62.349h-9.75l-2.049-39.083h13.847zM43.004 76.032q0-3.77 2.049-5.244 2.048-1.557 4.998-1.557 2.867 0 4.916 1.557 2.048 1.475 2.048 5.244 0 3.605-2.048 5.244-2.049 1.556-4.916 1.556-2.95 0-4.998-1.556-2.049-1.64-2.049-5.244z"
      />
    </>
  ),
  "!!": (
    <>
      <path
        fill="#fff"
        d="M71.967 62.349h-9.75l-2.049-39.083h13.847zM60.004 76.032q0-3.77 2.049-5.244 2.048-1.557 4.998-1.557 2.867 0 4.916 1.557 2.048 1.475 2.048 5.244 0 3.605-2.048 5.244-2.049 1.556-4.916 1.556-2.95 0-4.998-1.556-2.049-1.64-2.049-5.244zM37.967 62.349h-9.75l-2.049-39.083h13.847zM26.004 76.032q0-3.77 2.049-5.244 2.048-1.557 4.998-1.557 2.867 0 4.916 1.557 2.048 1.475 2.048 5.244 0 3.605-2.048 5.244-2.049 1.556-4.916 1.556-2.95 0-4.998-1.556-2.049-1.64-2.049-5.244z"
      />
    </>
  ),
  "?": (
    <>
      <path
        fill="#fff"
        d="M40.436 60.851q0-4.66 1.957-7.83 1.958-3.17 6.712-6.619 4.195-2.983 5.967-5.127 1.864-2.237 1.864-5.22 0-2.983-2.237-4.475-2.144-1.585-6.06-1.585-3.915 0-7.737 1.212t-7.83 3.263l-4.941-9.975q4.568-2.517 9.881-4.101 5.314-1.585 11.653-1.585 9.695 0 15.008 4.661 5.407 4.661 5.407 11.839 0 3.822-1.212 6.619-1.212 2.796-3.635 5.22-2.424 2.33-6.06 5.034-2.703 1.958-4.195 3.356-1.491 1.398-2.05 2.703-.467 1.305-.467 3.263v2.703H40.436zm-1.492 18.924q0-4.288 2.33-5.966 2.331-1.771 5.687-1.771 3.263 0 5.594 1.771 2.33 1.678 2.33 5.966 0 4.102-2.33 5.966-2.331 1.772-5.594 1.772-3.356 0-5.686-1.772-2.33-1.864-2.33-5.966z"
      />
    </>
  ),
  "??": (
    <>
      <path
        fill="#fff"
        d="M31.8 22.22c-3.675 0-7.052.46-10.132 1.38-3.08.918-5.945 2.106-8.593 3.565l4.298 8.674c2.323-1.189 4.592-2.136 6.808-2.838a22.138 22.138 0 0 1 6.728-1.053c2.27 0 4.025.46 5.268 1.378 1.297.865 1.946 2.16 1.946 3.89s-.541 3.242-1.622 4.539c-1.027 1.243-2.756 2.73-5.188 4.458-2.756 2-4.7 3.918-5.836 5.755-1.134 1.837-1.702 4.107-1.702 6.808v2.92h10.457v-2.35c0-1.135.135-2.082.406-2.839.324-.756.918-1.54 1.783-2.35.864-.81 2.079-1.784 3.646-2.918 2.107-1.568 3.863-3.026 5.268-4.376 1.405-1.405 2.46-2.92 3.162-4.541.703-1.621 1.054-3.54 1.054-5.755 0-4.161-1.568-7.592-4.702-10.294-3.08-2.702-7.43-4.052-13.05-4.052zm38.664 0c-3.675 0-7.053.46-10.133 1.38-3.08.918-5.944 2.106-8.591 3.565l4.295 8.674c2.324-1.189 4.593-2.136 6.808-2.838a22.138 22.138 0 0 1 6.728-1.053c2.27 0 4.026.46 5.269 1.378 1.297.865 1.946 2.16 1.946 3.89s-.54 3.242-1.62 4.539c-1.027 1.243-2.757 2.73-5.189 4.458-2.756 2-4.7 3.918-5.835 5.755-1.135 1.837-1.703 4.107-1.703 6.808v2.92h10.457v-2.35c0-1.135.134-2.082.404-2.839.324-.756.918-1.54 1.783-2.35.865-.81 2.081-1.784 3.648-2.918 2.108-1.568 3.864-3.026 5.269-4.376 1.405-1.405 2.46-2.92 3.162-4.541.702-1.621 1.053-3.54 1.053-5.755 0-4.161-1.567-7.592-4.702-10.294-3.08-2.702-7.43-4.052-13.05-4.052zM29.449 68.504c-1.945 0-3.593.513-4.944 1.54-1.351.973-2.027 2.703-2.027 5.188 0 2.378.676 4.108 2.027 5.188 1.35 1.027 3 1.54 4.944 1.54 1.892 0 3.512-.513 4.863-1.54 1.35-1.08 2.026-2.81 2.026-5.188 0-2.485-.675-4.215-2.026-5.188-1.351-1.027-2.971-1.54-4.863-1.54zm38.663 0c-1.945 0-3.592.513-4.943 1.54-1.35.973-2.026 2.703-2.026 5.188 0 2.378.675 4.108 2.026 5.188 1.351 1.027 2.998 1.54 4.943 1.54 1.891 0 3.513-.513 4.864-1.54 1.351-1.08 2.027-2.81 2.027-5.188 0-2.485-.676-4.215-2.027-5.188-1.35-1.027-2.973-1.54-4.864-1.54z"
      />
    </>
  ),
  "!?": (
    <>
      <path
        fill="#fff"
        d="M60.823 58.9q0-4.098 1.72-6.883 1.721-2.786 5.9-5.818 3.687-2.622 5.243-4.506 1.64-1.966 1.64-4.588t-1.967-3.933q-1.885-1.393-5.326-1.393t-6.8 1.065q-3.36 1.065-6.883 2.868l-4.343-8.767q4.015-2.212 8.685-3.605 4.67-1.393 10.242-1.393 8.521 0 13.192 4.097 4.752 4.096 4.752 10.405 0 3.36-1.065 5.818-1.066 2.458-3.196 4.588-2.13 2.048-5.326 4.424-2.376 1.72-3.687 2.95-1.31 1.229-1.802 2.376-.41 1.147-.41 2.868v2.376h-10.57zm-1.311 16.632q0-3.77 2.048-5.244 2.049-1.557 4.998-1.557 2.868 0 4.916 1.557 2.049 1.475 2.049 5.244 0 3.605-2.049 5.244-2.048 1.556-4.916 1.556-2.95 0-4.998-1.556-2.048-1.64-2.048-5.244zM36.967 61.849h-9.75l-2.049-39.083h13.847zM25.004 75.532q0-3.77 2.049-5.244 2.048-1.557 4.998-1.557 2.867 0 4.916 1.557 2.048 1.475 2.048 5.244 0 3.605-2.048 5.244-2.049 1.556-4.916 1.556-2.95 0-4.998-1.556-2.049-1.64-2.049-5.244z"
      />
    </>
  ),
  "?!": (
    <>
      <path
        fill="#fff"
        d="M37.734 21.947c-3.714 0-7.128.464-10.242 1.393-3.113.928-6.009 2.13-8.685 3.605l4.343 8.766c2.35-1.202 4.644-2.157 6.883-2.867a22.366 22.366 0 0 1 6.799-1.065c2.294 0 4.07.464 5.326 1.393 1.311.874 1.967 2.186 1.967 3.933 0 1.748-.546 3.277-1.639 4.588-1.038 1.257-2.786 2.758-5.244 4.506-2.786 2.021-4.751 3.961-5.898 5.819-1.147 1.857-1.721 4.15-1.721 6.88v2.952h10.568v-2.377c0-1.147.137-2.103.41-2.868.328-.764.93-1.557 1.803-2.376.874-.82 2.104-1.803 3.688-2.95 2.13-1.584 3.906-3.058 5.326-4.424 1.42-1.42 2.485-2.95 3.195-4.59.71-1.638 1.065-3.576 1.065-5.816 0-4.206-1.584-7.675-4.752-10.406-3.114-2.731-7.51-4.096-13.192-4.096zm24.745.819l2.048 39.084h9.75l2.047-39.084zM35.357 68.73c-1.966 0-3.632.52-4.998 1.557-1.365.983-2.047 2.732-2.047 5.244 0 2.404.682 4.152 2.047 5.244 1.366 1.038 3.032 1.557 4.998 1.557 1.912 0 3.55-.519 4.916-1.557 1.366-1.092 2.05-2.84 2.05-5.244 0-2.512-.684-4.26-2.05-5.244-1.365-1.038-3.004-1.557-4.916-1.557zm34.004 0c-1.966 0-3.632.52-4.998 1.557-1.365.983-2.049 2.732-2.049 5.244 0 2.404.684 4.152 2.05 5.244 1.365 1.038 3.03 1.557 4.997 1.557 1.912 0 3.55-.519 4.916-1.557 1.366-1.092 2.047-2.84 2.047-5.244 0-2.512-.681-4.26-2.047-5.244-1.365-1.038-3.004-1.557-4.916-1.557z"
      />
    </>
  ),
  "+-": (
    <>
      <path
        fill="#fff"
        d="M 37.759 47.468 L 50.152 47.468 L 50.152 52.683 L 37.759 52.683 L 37.759 67.872 L 32.469 67.872 L 32.469 52.683 L 20 52.683 L 20 47.468 L 32.469 47.468 L 32.469 32.128 L 37.759 32.128 L 37.759 47.468 Z M 62.846 59.408 L 62.846 53.363 L 80 53.363 L 80 59.408 L 62.846 59.408 Z"
      />
    </>
  ),
  "±": (
    <>
      <path
        fill="#fff"
        d="M 53.477 40.166 L 69.768 40.166 L 69.768 47.02 L 53.477 47.02 L 53.477 67.086 L 46.523 67.086 L 46.523 47.02 L 30.132 47.02 L 30.132 40.166 L 46.523 40.166 L 46.523 20 L 53.477 20 L 53.477 40.166 Z M 30.132 80 L 30.132 73.146 L 69.868 73.146 L 69.868 80 L 30.132 80 Z"
      />
    </>
  ),
  "⩲": (
    <>
      <path
        fill="#fff"
        d="M 47.15 58.311 L 47.15 41.926 L 31.398 41.926 L 31.398 36.306 L 47.15 36.306 L 47.15 20 L 52.85 20 L 52.85 36.306 L 68.602 36.306 L 68.602 41.926 L 52.85 41.926 L 52.85 58.311 L 47.15 58.311 Z M 31.398 67.335 L 31.398 61.715 L 68.602 61.715 L 68.602 67.335 L 31.398 67.335 Z M 31.398 80 L 31.398 74.38 L 68.602 74.38 L 68.602 80 L 31.398 80 Z"
      />
    </>
  ),
  "=": (
    <>
      <path
        fill="#fff"
        d="M 20 39.367 L 20 28.886 L 80 28.886 L 80 39.367 L 20 39.367 Z M 20 71.114 L 20 60.633 L 80 60.633 L 80 71.114 L 20 71.114 Z"
      />
    </>
  ),
  "∞": (
    <>
      <path
        fill="#fff"
        d="M 65.306 68.132 C 62.418 68.132 59.608 67.221 56.876 65.4 C 54.145 63.579 51.648 60.659 49.388 56.641 C 47.441 60.283 45.243 63.061 42.794 64.977 C 40.345 66.892 37.582 67.849 34.505 67.849 C 31.805 67.849 29.356 67.127 27.159 65.683 C 24.961 64.239 23.218 62.182 21.931 59.514 C 20.644 56.845 20 53.689 20 50.047 C 20 46.593 20.612 43.501 21.837 40.77 C 23.061 38.038 24.788 35.871 27.018 34.271 C 29.247 32.669 31.837 31.868 34.788 31.868 C 37.677 31.868 40.502 32.732 43.265 34.459 C 46.028 36.185 48.477 39.058 50.612 43.077 C 52.559 39.435 54.741 36.703 57.159 34.882 C 59.576 33.061 62.323 32.151 65.4 32.151 C 69.733 32.151 73.25 33.783 75.95 37.049 C 78.65 40.314 80 44.553 80 49.765 C 80 53.218 79.388 56.327 78.164 59.089 C 76.939 61.852 75.228 64.05 73.03 65.683 C 70.832 67.316 68.257 68.132 65.306 68.132 Z M 34.694 61.538 C 37.017 61.538 39.105 60.581 40.958 58.666 C 42.81 56.751 44.615 53.815 46.374 49.859 C 44.804 45.965 43.093 43.046 41.241 41.099 C 39.388 39.152 37.268 38.179 34.882 38.179 C 32.182 38.179 30.047 39.341 28.477 41.664 C 26.907 43.987 26.122 46.782 26.122 50.047 C 26.122 53.124 26.86 55.809 28.336 58.101 C 29.812 60.393 31.931 61.538 34.694 61.538 Z M 65.024 61.821 C 67.786 61.821 69.969 60.675 71.57 58.384 C 73.171 56.091 73.972 53.344 73.972 50.141 C 73.972 46.813 73.155 44.035 71.523 41.806 C 69.89 39.576 67.755 38.462 65.118 38.462 C 62.857 38.462 60.832 39.419 59.043 41.335 C 57.253 43.25 55.447 46.185 53.626 50.141 C 55.259 54.035 56.986 56.954 58.807 58.901 C 60.628 60.848 62.7 61.821 65.024 61.821 Z"
      />
    </>
  ),
  "⩱": (
    <>
      <path
        fill="#fff"
        d="M 31.398 25.62 L 31.398 20 L 68.602 20 L 68.602 25.62 L 31.398 25.62 Z M 31.398 38.285 L 31.398 32.665 L 68.602 32.665 L 68.602 38.285 L 31.398 38.285 Z M 31.398 63.694 L 31.398 58.074 L 47.15 58.074 L 47.15 41.689 L 52.85 41.689 L 52.85 58.074 L 68.602 58.074 L 68.602 63.694 L 52.85 63.694 L 52.85 80 L 47.15 80 L 47.15 63.694 L 31.398 63.694 Z"
      />
    </>
  ),
  "∓": (
    <>
      <path
        fill="#fff"
        d="M 26.421 27.124 L 26.421 20 L 73.579 20 L 73.579 27.124 L 26.421 27.124 Z M 46.388 80 L 46.388 59.231 L 26.421 59.231 L 26.421 52.107 L 46.388 52.107 L 46.388 31.438 L 53.612 31.438 L 53.612 52.107 L 73.579 52.107 L 73.579 59.231 L 53.612 59.231 L 53.612 80 L 46.388 80 Z"
      />
    </>
  ),
  "-+": (
    <>
      <path
        fill="#fff"
        d="M 20 60.29 L 20 53.678 L 38.761 53.678 L 38.761 60.29 L 20 60.29 Z M 66.446 47.231 L 80 47.231 L 80 52.934 L 66.446 52.934 L 66.446 69.546 L 60.66 69.546 L 60.66 52.934 L 47.024 52.934 L 47.024 47.231 L 60.66 47.231 L 60.66 30.454 L 66.446 30.454 L 66.446 47.231 Z"
      />
    </>
  ),
  N: (
    <>
      <path
        fill="#fff"
        d="M 69.622 80 L 60.966 80 L 37.017 30.84 L 36.681 30.84 C 36.793 33.025 36.905 35.266 37.017 37.563 C 37.129 39.86 37.185 42.073 37.185 44.202 L 37.185 80 L 30.378 80 L 30.378 20 L 39.034 20 L 62.983 68.571 L 63.235 68.571 C 63.123 66.443 63.025 64.188 62.941 61.807 C 62.857 59.426 62.815 57.255 62.815 55.294 L 62.815 20 L 69.622 20 L 69.622 80 Z"
      />
    </>
  ),
  "↑↑": (
    <>
      <path
        fill="#fff"
        d="M 29.121 76.08 L 29.121 34.322 C 27.161 36.08 24.121 37.915 20 39.824 L 20 36.508 C 24.673 32.487 28.116 28.291 30.327 23.92 L 31.985 23.92 C 34.196 28.291 37.638 32.487 42.312 36.508 L 42.312 39.824 C 38.191 37.915 35.151 36.08 33.191 34.322 L 33.191 76.08 L 29.121 76.08 Z M 66.809 76.08 L 66.809 34.322 C 64.849 36.08 61.809 37.915 57.688 39.824 L 57.688 36.508 C 62.362 32.487 65.804 28.291 68.015 23.92 L 69.673 23.92 C 71.884 28.291 75.327 32.487 80 36.508 L 80 39.824 C 75.879 37.915 72.839 36.08 70.879 34.322 L 70.879 76.08 L 66.809 76.08 Z"
      />
    </>
  ),
  "↑": (
    <>
      <path
        fill="#fff"
        d="M 47.659 80 L 47.659 31.965 C 45.405 33.988 41.908 36.098 37.168 38.295 L 37.168 34.48 C 42.543 29.855 46.503 25.029 49.046 20 L 50.954 20 C 53.497 25.029 57.457 29.855 62.832 34.48 L 62.832 38.295 C 58.092 36.098 54.595 33.988 52.341 31.965 L 52.341 80 L 47.659 80 Z"
      />
    </>
  ),
  "→": (
    <>
      <path
        fill="#fff"
        d="M 20 52.341 L 20 47.659 L 68.035 47.659 C 66.012 45.405 63.902 41.908 61.705 37.168 L 65.52 37.168 C 70.145 42.543 74.971 46.503 80 49.046 L 80 50.954 C 74.971 53.497 70.145 57.457 65.52 62.832 L 61.705 62.832 C 63.902 58.092 66.012 54.595 68.035 52.341 L 20 52.341 Z"
      />
    </>
  ),
  "⇆": (
    <>
      <path
        fill="#fff"
        d="M 34.48 48.613 C 29.855 43.237 25.029 39.277 20 36.734 L 20 34.827 C 25.029 32.282 29.855 28.324 34.48 22.948 L 38.295 22.948 C 36.097 27.687 33.988 31.185 31.965 33.439 L 80 33.439 L 80 38.121 L 31.965 38.121 C 33.988 40.376 36.097 43.872 38.295 48.613 L 34.48 48.613 Z M 20 66.561 L 20 61.879 L 68.035 61.879 C 66.011 59.624 63.901 56.126 61.705 51.387 L 65.52 51.387 C 70.144 56.763 74.971 60.722 80 63.266 L 80 65.173 C 74.971 67.716 70.144 71.676 65.52 77.052 L 61.705 77.052 C 63.901 72.312 66.011 68.815 68.035 66.561 L 20 66.561 Z"
      />
    </>
  ),
  "=∞": (
    <>
      <path
        fill="#fff"
        d="M 20 46.244 L 20 42.856 L 39.395 42.856 L 39.395 46.244 L 20 46.244 Z M 20 56.506 L 20 53.118 L 39.395 53.118 L 39.395 56.506 L 20 56.506 Z M 72.34 59.452 C 70.834 59.452 69.37 58.977 67.946 58.028 C 66.522 57.079 65.22 55.557 64.042 53.462 C 63.027 55.36 61.882 56.809 60.605 57.807 C 59.328 58.806 57.888 59.305 56.284 59.305 C 54.876 59.305 53.6 58.928 52.454 58.175 C 51.308 57.423 50.4 56.35 49.729 54.959 C 49.058 53.568 48.722 51.923 48.722 50.025 C 48.722 48.224 49.042 46.612 49.68 45.188 C 50.318 43.764 51.218 42.635 52.38 41.8 C 53.542 40.965 54.893 40.548 56.431 40.548 C 57.937 40.548 59.41 40.998 60.85 41.898 C 62.291 42.798 63.567 44.296 64.68 46.391 C 65.695 44.492 66.833 43.069 68.093 42.119 C 69.353 41.17 70.785 40.695 72.389 40.695 C 74.648 40.695 76.481 41.546 77.889 43.249 C 79.296 44.951 80 47.16 80 49.877 C 80 51.678 79.681 53.298 79.043 54.738 C 78.404 56.179 77.512 57.324 76.366 58.175 C 75.221 59.026 73.879 59.452 72.34 59.452 Z M 56.382 56.015 C 57.593 56.015 58.682 55.516 59.647 54.517 C 60.613 53.519 61.554 51.989 62.471 49.926 C 61.652 47.897 60.76 46.375 59.795 45.36 C 58.829 44.345 57.724 43.838 56.48 43.838 C 55.073 43.838 53.96 44.443 53.141 45.655 C 52.323 46.866 51.914 48.322 51.914 50.025 C 51.914 51.629 52.299 53.028 53.068 54.223 C 53.837 55.418 54.942 56.015 56.382 56.015 Z M 72.193 56.162 C 73.633 56.162 74.771 55.565 75.605 54.37 C 76.44 53.175 76.858 51.743 76.858 50.074 C 76.858 48.339 76.432 46.89 75.581 45.728 C 74.73 44.566 73.617 43.985 72.242 43.985 C 71.064 43.985 70.008 44.484 69.075 45.483 C 68.142 46.481 67.201 48.011 66.252 50.074 C 67.103 52.103 68.003 53.625 68.952 54.64 C 69.901 55.655 70.982 56.162 72.193 56.162 Z"
      />
    </>
  ),
  "⊕": (
    <>
      <path
        fill="#fff"
        d="M 50.045 80 C 45.87 80 41.952 79.229 38.291 77.686 C 34.63 76.142 31.437 73.994 28.714 71.241 C 25.991 68.487 23.858 65.295 22.315 61.664 C 20.772 58.033 20 54.13 20 49.955 C 20 45.84 20.772 41.967 22.315 38.336 C 23.858 34.705 26.006 31.513 28.76 28.76 C 31.513 26.006 34.705 23.858 38.336 22.315 C 41.967 20.772 45.87 20 50.045 20 C 54.16 20 58.033 20.772 61.664 22.315 C 65.295 23.858 68.487 26.006 71.241 28.76 C 73.994 31.513 76.142 34.705 77.686 38.336 C 79.229 41.967 80 45.84 80 49.955 C 80 54.13 79.229 58.033 77.686 61.664 C 76.142 65.295 73.994 68.487 71.241 71.241 C 68.487 73.994 65.295 76.142 61.664 77.686 C 58.033 79.229 54.16 80 50.045 80 Z M 52.224 47.776 L 75.28 47.776 C 74.917 43.722 73.676 40.015 71.558 36.657 C 69.44 33.298 66.702 30.56 63.344 28.442 C 59.985 26.324 56.278 25.083 52.224 24.72 L 52.224 47.776 Z M 24.72 47.776 L 47.776 47.776 L 47.776 24.72 C 43.661 25.083 39.925 26.324 36.566 28.442 C 33.207 30.56 30.484 33.298 28.397 36.657 C 26.309 40.015 25.083 43.722 24.72 47.776 Z M 24.72 52.224 C 25.083 56.339 26.324 60.061 28.442 63.389 C 30.56 66.717 33.298 69.44 36.657 71.558 C 40.015 73.676 43.722 74.917 47.776 75.28 L 47.776 52.224 L 24.72 52.224 Z M 52.224 52.224 L 52.224 75.28 C 56.278 74.917 59.985 73.692 63.344 71.604 C 66.702 69.516 69.44 66.793 71.558 63.435 C 73.676 60.076 74.917 56.339 75.28 52.224 L 52.224 52.224 Z"
      />
    </>
  ),
  "∆": (
    <>
      <path
        fill="#fff"
        d="M 27.269 80 L 27.269 75.378 L 46.176 20 L 53.739 20 L 72.731 75.462 L 72.731 80 L 27.269 80 Z M 35.336 73.361 L 64.412 73.361 L 53.908 42.101 C 52.059 36.555 50.714 31.933 49.874 28.235 C 49.146 30.98 48.473 33.473 47.857 35.714 C 47.241 37.955 46.625 39.972 46.008 41.765 L 35.336 73.361 Z"
      />
    </>
  ),
  "□": (
    <>
      <path
        fill="#fff"
        d="M 20 80 L 20 20 L 80 20 L 80 80 L 20 80 Z M 24.286 75.714 L 75.714 75.714 L 75.714 24.286 L 24.286 24.286 L 24.286 75.714 Z"
      />
    </>
  ),
  "⨀": (
    <>
      <path
        fill="#fff"
        d="M 50 80 C 45.884 80 42.01 79.225 38.378 77.676 C 34.746 76.126 31.55 73.971 28.789 71.211 C 26.029 68.45 23.874 65.254 22.324 61.622 C 20.775 57.99 20 54.116 20 50 C 20 45.835 20.775 41.949 22.324 38.341 C 23.874 34.734 26.029 31.55 28.789 28.789 C 31.55 26.029 34.746 23.874 38.378 22.324 C 42.01 20.775 45.884 20 50 20 C 54.165 20 58.051 20.775 61.659 22.324 C 65.266 23.874 68.45 26.029 71.211 28.789 C 73.971 31.55 76.126 34.734 77.676 38.341 C 79.225 41.949 80 45.835 80 50 C 80 54.116 79.225 57.99 77.676 61.622 C 76.126 65.254 73.971 68.45 71.211 71.211 C 68.45 73.971 65.266 76.126 61.659 77.676 C 58.051 79.225 54.165 80 50 80 Z M 50 76.295 C 53.632 76.295 57.034 75.617 60.206 74.262 C 63.378 72.906 66.174 71.017 68.596 68.596 C 71.017 66.174 72.906 63.378 74.262 60.206 C 75.617 57.034 76.295 53.632 76.295 50 C 76.295 46.368 75.617 42.966 74.262 39.794 C 72.906 36.622 71.017 33.826 68.596 31.404 C 66.174 28.983 63.378 27.094 60.206 25.739 C 57.034 24.383 53.632 23.705 50 23.705 C 46.368 23.705 42.966 24.383 39.794 25.739 C 36.622 27.094 33.826 28.983 31.404 31.404 C 28.983 33.826 27.094 36.622 25.739 39.794 C 24.383 42.966 23.705 46.368 23.705 50 C 23.705 53.632 24.383 57.034 25.739 60.206 C 27.094 63.378 28.983 66.174 31.404 68.596 C 33.826 71.017 36.622 72.906 39.794 74.262 C 42.966 75.617 46.368 76.295 50 76.295 Z M 50 55.739 C 48.402 55.739 47.046 55.182 45.932 54.068 C 44.818 52.954 44.262 51.598 44.262 50 C 44.262 48.402 44.818 47.046 45.932 45.932 C 47.046 44.818 48.402 44.262 50 44.262 C 51.598 44.262 52.954 44.818 54.068 45.932 C 55.182 47.046 55.739 48.402 55.739 50 C 55.739 51.598 55.182 52.954 54.068 54.068 C 52.954 55.182 51.598 55.739 50 55.739 Z"
      />
    </>
  ),
  "⊗": (
    <>
      <path
        fill="#fff"
        d="M 35 20 L 50 35 L 65 20 L 80 35 L 65 50 L 80 65 L 65 80 L 50 65 L 35 80 L 20 65 L 35 50 L 20 35 L 35 20 Z"
      />
    </>
  ),
} as const;
